/* -----------------
* brief
* 1. this is code gen by tools
* 2. array like [a,b,c] after each field, define the ui html tag in view,
		a for title,
		b for show or not ,
		c for element html tag , currently support : check、radio、select、input、textarea、upload
* 3. XXX
*/
//使用方法：在工程root目录下，执行go generate ./modules/product/models
//go:generate legogen -type=Product -kv=ModuleName=product,PrjName=saas_sys_base -dirconf=../../.. ./Product.go
package product

import "github.com/mjiulee/lego"

func init() {
	lego.AddBeanToSynList(new(Product))
}

/* table: "tb_product"
 * -----------------
 */
type Product struct {
	Id    int64  `xorm:"pk"`               // ["id","hide","hidden"]
	IfDel int    `xorm:"default 0"`        // ["deleted","hide","hidden"]
	Cdate string `xorm:"DateTime created"` // ["create","show","datetime"]
	Udate string `xorm:"DateTime updated"` // ["update","show","datetime"]
	// add your custom field here

	ProductName string `xorm:"varchar(255)  "` // ["商品名称","show","input"]

	DefaultImage string `xorm:"varchar(255)  "` // ["商品图片","show","input"]

	Video string `xorm:"varchar(255)  "` // ["视频","show","upload"]

	Postage int64 `xorm:"BigInt "` // ["运费","show","input"]

	Description string `xorm:"text  "` // ["商品详情","show","input"]

	IfSale int `xorm:"default 0"` // ["销售状态","show","input"]

	EShopId int64 `xorm:"BigInt  "` // ["所属店铺","show","input"]

	TenantId int64 `xorm:"BigInt  "` // ["关联租户","hide","hide"]

	Specs []*ProductSpec `xorm:"-"`  //规格明细列表

	ItemNo string `xorm:"varchar(255)  "` // ["货号","show","input"]

	ImageList []*ImageList `xorm:"_"` //图片

	CateId int64 `xorm:"BigInt  "` // ["分类","show","input"]

}
